<?php

header('Content-type: text/javascript; charset=utf-8');

define('DIR', './src/');

$output = '';

$output .= file_get_contents(DIR . 'intro.js');
$output .= file_get_contents(DIR . 'core.js');
$output .= file_get_contents(DIR . 'object.js');

$sources = scandir(DIR);
$exceptions = array('.', '..', 'intro.js', 'outro.js', 'core.js', 'license.txt');
$exceptions[] = 'object.js';
foreach ($sources as $source) {
	if (in_array($source, $exceptions)) {
		continue;
	}
	
	$output .= file_get_contents(DIR . $source) . "\r\n\r\n\r\n\r\n";
}

$output .= file_get_contents(DIR . 'outro.js');

echo $output;

?>